import request from '@/utils/request'
import qs from 'qs'

export function list(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/lists',
    method: 'get',
    params: data
  })
}
export function deleteAll(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/delete',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function detail(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/detail',
    method: 'get',
    params: data
  })
}
export function getTagList(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/tags/index',
    method: 'get',
    params: data
  })
}
export function addTag(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/tags/add',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function editTag(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/tags/edit',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function deleteTag(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/tags/del',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function deleteAllTag(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/tags/batchDel',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function putawayStatus(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/showPackage',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function addHotel(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/add',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function getHotelJson(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/config/hotel',
    method: 'get',
    params: data
  })
}
export function editType(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/edit',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function getEditType(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/package/edit',
    method: 'get',
    params: data
  })
}
export function attestation(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/shop_auth/identification',
    method: 'post',
    data: qs.stringify(data)
  })
}
export function getAttestation(params) {
  const data = {
    ...params
  }
  return request({
    url: '/merchant/shop_auth/info',
    method: 'get',
    params: data
  })
}
